package cn.com.surker.sale.dao;

import cn.com.surker.sale.entity.SaleContractSubsidyPrice;
import cn.com.surker.vo.sale.SaleContractSubsidyPriceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 销售合同补贴费用表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-07-26
 */
public interface SaleContractSubsidyPriceDao extends BaseMapper<SaleContractSubsidyPrice> {


    IPage<SaleContractSubsidyPriceVO>  queryPage(Page<SaleContractSubsidyPriceVO> page, @Param("searchVal") String searchVal,
                                                 @Param("orgId") Integer orgId,@Param("status") Integer status,
                                                 @Param("startDate")String startDate,@Param("endDate")String endDate,
                                                 @Param("pumpNormId")Long pumpNormId, @Param("sales")String sales);


	/**
	 * 批量保存,如果存在,则新增
	 *
	 * @param entityList
	 * @return
	 */
	int saveBatch(Collection<SaleContractSubsidyPrice> entityList);


	/**
	 * 根据ID集合查询数据
	 * @param indenList
	 * @return
	 */
	List<Map<String, Object>> queryIndenByIds(@Param("dsCode") String dsCode, @Param("indenIds") List<Long> indenList);

	/**
	 * 根据组织和合同ID查询数据
	 * @param orgId
	 * @param conId
	 * @return
	 */
	List<Map<String, Object>> queryByOrgIdAndConId(@Param("dsCode") String dsCode, @Param("orgId") Long orgId, @Param("conId") Long conId, @Param("startDate") String startDate, @Param("endDate") String endDate);
}
